﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_MailExtSetAdd]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_MailExtSetAdd];
GO
CREATE PROCEDURE [dbo].[sproc_MailExtSetAdd]
    (
     @Username            [nvarchar](50),
     @Title                [nvarchar](100),
    @Email            [nvarchar](200),
     @SmtpAuth            [bit],
     @SmtpServer            [nvarchar](50),
     @SmtpUsername    [nvarchar](50),
     @SmtpPassword    [nvarchar](50),
    @SmtpPort        [smallint],
     @PopServer            [nvarchar](50),
     @PopUsername    [nvarchar](50),
     @PopPassword    [nvarchar](50),
    @PopPort        [smallint],
    @IsDelAfterRead    [bit],
     @IsReceiveNew           [bit],
     @TimeOut         [int],
    @OrderID        [int]
    
)
AS 
  
INSERT INTO TabExtMailSetting
     ( 
     [Username],
     [Title],
     [Email],
     [SmtpAuth],
     [SmtpServer],
     [SmtpUsername],
    [SmtpPassword],
     [SmtpPort],
     [PopServer],
     [PopUsername],
     [PopPassword],
     [PopPort],
     [IsDelAfterRead],
     [IsReceiveNew],
    [TimeOut],
    [OrderID]
     ) 
 
VALUES 
    ( 
     @Username            ,
     @Title                ,
     @Email            ,
     @SmtpAuth            ,
     @SmtpServer            ,
     @SmtpUsername    ,
     @SmtpPassword    ,
    @SmtpPort        ,
     @PopServer            ,
     @PopUsername    ,
     @PopPassword                 ,
    @PopPort        ,
    @IsDelAfterRead    ,
     @IsReceiveNew           ,
     @TimeOut         ,
     @OrderID
     )